|
|
|
|
|
|
|
Figure 10.16
A pentagonal initiator and square generator with depth one, two, and three snowflakes. |
|
|
|
|
|
|
|
|
Space-filling curves, like snowflakes, are defined recursively. As the level of recursion increases, the curve becomes more and more complex. Eventually a space-filling curve covers the area it occupies in a very special way. For any point (x, y) within the area and for any distance D, no matter how small, the curve will eventually pass within distance D of the point (x, y). |
|
|
|
|
|
|
|
|
To think of this in another way, suppose a space-filling curve occupies the area 0 <= x <= 1, 0 <= y <= 1. Now suppose the value for D is 1 millionth of a unit. For a large enough level of recursion, the space-filling curve will pass within 1 millionth of a unit of every point in the area. |
|
|
|
|
|
|
|
|
As with snowflakes, you create a space-filling curve by breaking a large curve into smaller pieces. You then use the curve itself, properly scaled and rotated, to build the pieces. You can continue to break the pieces into smaller and smaller pieces until you have reached some desired level of recursion. |
|
|
|
|
|
|
|
|
The sections that follow describe three different space-filling curves: Hilbert, Sierpinski, and Peano. |
|
|
|
|
|